<?
$search = new Search ('search.xml', 'list.xml');

$search->recovery ();

if ((bool) Business::singleton ()->getSection (Section::TCURRENT)->getDirective ('_USE_ACTOR_FILTER_') && !User::singleton ()->hasPermission ('_VIEW_ALL_'))
	$search->addBlock ('_ACTOR_', User::singleton ()->getId ());
	
$view = new View ('list.xml');

if (!$view->load ($search->makeWhere ()))
	throw new Exception (__ ('Unable to load data!'));
?>